<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<head>
    <title>login</title>
</head>
<html>
    <body>
        <h1 class="title">用户登录</h1>
        <form action="login" method="POST">
            <div>
                <label>用户名: </label>
                <input type="textarea" name="name" title="name">
            </div>
            <div>
                <label>密码: </label>
                <input type="password" name="password" title="password">
            </div>
            <br>
            <input type="submit" value="登录">
            <input type="button" value="注册" onclick="location='register'">
        </form>
    </body>
    <style type="text/css">
        form, .title{
            text-align: center;
        }
        form > div > label{
            width: 75px;
            display: inline-block;
            text-align: right;
        }
    </style>
    <% if (request.getAttribute("alert") != null) { %>
        <script type="text/javascript">
            alert('<%= request.getAttribute("alert") %>');
        </script>
    <% } %>
</html>
